﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Common.Enums.InsuranceWarranty;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.InsuranceWarranty;

namespace ZBJF.Warranty.BLL
{
    public partial class InsuranceWarrantyRecordFeedBackIussesService
    {
        public InsuranceWarrantyRecordFeedBackIusses Load(int id)
        {
            return LoadEntities(o => o.ID == id).FirstOrDefault();
        }
        public InsuranceWarrantyRecordFeedBackIusses LoadUnSolveFeedBackIusses(long insuranceWarrantyRecordID)
        {
            var status = (byte)FeedbackIssueStatus.WaitingFeedbackConsulting;
            return LoadEntities(o => o.ID == insuranceWarrantyRecordID && o.Status == status).FirstOrDefault();
        }

        public IQueryable<InsuranceWarrantyRecordFeedBackIusses> LoadList(long insuranceWarrantyRecordID)
        {
            return LoadEntities(o => o.InsuranceWarrantyRecordID == insuranceWarrantyRecordID);
        }

    }
}
